﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace FixtureManageSystem.Models
{
    public class SearchBorrow : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;


        ///领用人信息，可能是工号，可能是姓名
        private string personNo = String.Empty;
        public string PersonNo
        {
            get
            {
                return personNo;
            }
            set
            {
                if (value != this.personNo)
                {
                    personNo = value;
                    OnPropertyChanged();
                }
            }
        }

        /// <summary>
        /// 条形码
        /// </summary>
        /// <param name="barCode"></param>
        private string barCode = String.Empty;
        public string BarCode
        {
            get
            {
                return barCode;
            }
            set
            {
                if (value != this.barCode)
                {
                    barCode = value;
                    OnPropertyChanged();
                }
            }
        }

        /// <summary>
        /// 开始时间
        /// </summary>
        /// <param name="StartTime"></param>
        private DateTime _startTime;
        public DateTime StartTime
        {
            get { return _startTime; }
            set
            {
                if (value != _startTime)
                {
                    _startTime = value; OnPropertyChanged();
                }
            }
        }

        /// <summary>
        /// 结束时间
        /// </summary>
        /// <param name="EndTime"></param>
        private DateTime _endTime;
        public DateTime EndTime
        {
            get { return _endTime; }
            set
            {
                if (value != _endTime)
                {
                    _endTime = value; OnPropertyChanged();
                }
            }
        }

        //适用项目
        private string applicationProject;
        public string ApplicationProject
        {
            get { return applicationProject; }
            set
            {
                if (value != this.applicationProject)
                {
                    applicationProject = value;
                    OnPropertyChanged();
                }
            }
        }

        private void OnPropertyChanged([CallerMemberName] String propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
